<?php
class Student extends AppModel {

	var $name = 'Student';
	var $useDbConfig = 'ksmu';
	var $validate = array(
		'learningform_id' => array('numeric'),
		'learningtype_id' => array('numeric'),
		'studentgroup_id' => array('numeric'),
		'studentstate_id' => array('numeric'),
		'lastname' => array('notempty'),
		'firstname' => array('notempty'),
		'surname' => array('notempty')
	);

	//The Associations below have been created with all possible keys, those that are not needed can be removed
	var $belongsTo = array(
		'Learningform' => array(
			'className' => 'Learningform',
			'foreignKey' => 'learningform_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Learningtype' => array(
			'className' => 'Learningtype',
			'foreignKey' => 'learningtype_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Studentgroup' => array(
			'className' => 'Studentgroup',
			'foreignKey' => 'studentgroup_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Studentstate' => array(
			'className' => 'Studentstate',
			'foreignKey' => 'studentstate_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);

	var $hasMany = array(
		'Studentinfo' => array(
			'className' => 'Studentinfo',
			'foreignKey' => 'student_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		),
		'Order' => array(
			'className' => 'Order',
			'foreignKey' => 'student_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		),
		'Studentfoto' => array(
			'className' => 'Studentfoto',
			'foreignKey' => 'student_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		)		
	);
}
?>